package com.edu.exam.enums.assessment;

import com.edu.exam.enums.core.BaseEnum;

/**
 * 作业状态枚举
 */
public enum JobStatus implements BaseEnum {
    PENDING("PENDING", "待执行"),
    RUNNING("RUNNING", "执行中"),
    COMPLETED("COMPLETED", "已完成"),
    FAILED("FAILED", "执行失败"),
    CANCELLED("CANCELLED", "已取消"),
    PAUSED("PAUSED", "已暂停"),
    RETRYING("RETRYING", "重试中"),
    TIMEOUT("TIMEOUT", "超时"),
    SKIPPED("SKIPPED", "已跳过"),
    WAITING("WAITING", "等待中"),
    SUSPENDED("SUSPENDED", "已挂起"),
    BLOCKED("BLOCKED", "已阻塞");

    private final String code;
    private final String description;

    JobStatus(String code, String description) {
        this.code = code;
        this.description = description;
    }

    @Override
    public String getCode() {
        return code;
    }

    @Override
    public String getDescription() {
        return description;
    }
}
